<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>告警属性</title>
	<meta name="decorator" content="default"/>
	<tags:import includes="spinner,bootbox,form"></tags:import>
	<script src="${ctxStatic}/modules/alarm/alarmprop.js"></script>	
	<script type="text/javascript">
		var _ctx = '${ctx}';
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<br>
	<form:form id="searchForm" modelAttribute="alarmprop" action="${ctx}/alarm/alarmprop/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>		
		<!--添加查询条件-->
	    <div class="control-group">
	        <span class="span3">
	            <label class="control-label" for="form-field-5">告警名称：</label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label>
	        	<input class="span1" type="text" id="form-field-5" name="aname" value="${aprop.aname}"/>
	          </label>
	        </span>  
	        &nbsp;	
	        
	        <span class="span3">
	          <label class="control-label" for="form-field-5">机&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;盘：</label>
	        </span>	  
	        &nbsp;
<%-- 	        <span class="span3">
	          <label>
	            <select id="slotSel" class="easyui-combobox" style="width:160px;" name="cardtype.id">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${slotlist}" var="slot">
	                  <c:if test="${slot.card.cardid==aprop.cardtype.id}">
 	                    <option value="${slot.card.cardid}" selected>${slot.num}：${slot.card.cardtype.cardtype}</option>
 	                  </c:if>
	                  <c:if test="${slot.card.cardid!=aprop.cardtype.id}">
 	                    <option value="${slot.card.cardid}">${slot.num}：${slot.card.cardtype.cardtype}</option>
 	                  </c:if> 	                  
 	                </c:forEach>
	            </select>
	          </label>
	        </span>	 --%>        
	        
 	        <span class="span3">
	          <label>
	            <select id="cardtypeSel" class="easyui-combobox" style="width:160px;" name="cardtype.id">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${ctypelist}" var="ctype">
	                    <c:if test="${ctype.id==aprop.cardtype.id}">
 	                      <option value="${ctype.id}" selected>${ctype.cardtype}</option>
 	                    </c:if>
	                    <c:if test="${ctype.id!=aprop.cardtype.id}">
 	                      <option value="${ctype.id}">${ctype.cardtype}</option>
 	                    </c:if> 	                    
 	                </c:forEach>
	            </select>
	          </label>
	        </span>	 	        
	        
	        &nbsp;
	        <span class="span3">
	          <button id="btn_query" class="btn btn-info">
	        	查  询
	      	  </button>
	        </span>
	        &nbsp;
<!-- 	        <span class="span3"> -->
<!-- 	          <button class="btn btn-info"> -->
<!-- 	                                修 改 -->
<!-- 	      	  </button> -->
<!-- 	        </span> -->
	    </div>    
	    <div class="control-group">
<!-- 	        <span class="span3"> -->
<!-- 	            <label class="control-label" for="form-field-5">站&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点：</label> -->
<!-- 	        </span> -->
<!-- 	        &nbsp; -->
<!-- 	        <span class="span3"> -->
<!-- 	          <label> -->
<!-- 	            <select id="siteSel" class="easyui-combobox" style="width:160px;" name="sid"> -->
<!-- 	                 <option value="0" selected>ALL</option> -->
<%-- 	                 <c:forEach items="${slist}" var="siteinfo"> --%>
<%-- 	                     <c:if test="${siteinfo.sid==aprop.sid}"> --%>
<%-- 	                      <option value="${siteinfo.sid}" selected>${siteinfo.sname}</option> --%>
<%-- 	                     </c:if> --%>
<%-- 	                     <c:if test="${siteinfo.sid!=aprop.sid}"> --%>
<%-- 	                      <option value="${siteinfo.sid}">${siteinfo.sname}</option> --%>
<%-- 	                     </c:if>	                      --%>
<%-- 	                 </c:forEach> --%>
<!-- 	            </select> -->
<!-- 	          </label> -->
<!-- 	        </span> -->
<!-- 	        &nbsp; -->
<!-- 	        <span class="span3"> -->
<!-- 	          <label class="control-label" for="form-field-5">网元标识：</label> -->
<!-- 	        </span>	   -->
<!-- 	        &nbsp; -->
<!-- 	        <span class="span3"> -->
<!-- 	          <label> -->
<!-- 	            <select id="neSel" class="easyui-combobox" style="width:160px;" name="nid"> -->
<!-- 	                <option value="0" selected>ALL</option> -->
<%-- 	                <c:forEach items="${nelist}" var="neinfo"> --%>
<%-- 	                   <c:if test="${neinfo.nid==aprop.nid}"> --%>
<%--  	                     <option value="${neinfo.nid}" selected>${neinfo.ip}</option> --%>
<%--  	                   </c:if> --%>
<%-- 	                   <c:if test="${neinfo.nid!=aprop.nid}"> --%>
<%--  	                     <option value="${neinfo.nid}">${neinfo.ip}</option> --%>
<%--  	                   </c:if> 	                    --%>
<%--  	                </c:forEach> --%>
<!-- 	            </select> -->
<!-- 	          </label> -->
<!-- 	        </span> -->
<!-- 	        &nbsp; -->
	    </div>
		<br>
	    <div class="control-group">
	        <span class="span3">
	            <label class="control-label" for="form-field-5">严重程度：</label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label>
	            <select class="easyui-combobox" style="width:160px;" name="severity.id">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${selist}" var="seinfo">
	                 <c:if test="${seinfo.id==aprop.severity.id}"> 
	                  <option value="${seinfo.id}" selected>${seinfo.severity}</option>
	                 </c:if>
	                 <c:if test="${seinfo.id!=aprop.severity.id}"> 
	                  <option value="${seinfo.id}">${seinfo.severity}</option>
	                 </c:if>	                 
	              </c:forEach>
	            </select>
	          </label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label class="control-label" for="form-field-5">告警类型：</label>
	        </span>	  
	        &nbsp;
	        <span class="span3">
	          <label>
	        	<select class="easyui-combobox" style="width:160px;" name="alarmtype.aid">
	                <option value="0" selected>ALL</option>
	                <c:forEach items="${atlist}" var="atype">
	                  <c:if test="${atype.aid==aprop.alarmtype.aid}">
	                   <option value="${atype.aid}" selected>${atype.alarmdesc}</option>
	                  </c:if>
	                  <c:if test="${atype.aid!=aprop.alarmtype.aid}">
	                   <option value="${atype.aid}">${atype.alarmdesc}</option>
	                  </c:if>	                  
	                </c:forEach>
	            </select>
	          </label>
	        </span>
	        &nbsp;
	        <span class="span3">
	          <label class="control-label" for="form-field-5">是否屏蔽：</label>
	        </span>	  
	        &nbsp;
	        <span class="span3">
	          <label>
	        	<select class="easyui-combobox" style="width:160px;" name="filter">
	        	    <option value="2" selected>ALL</option>
	        	    <c:if test="${aprop.filter==0}">
	                  <option value="0" selected>No</option>
	                  <option value="1">Yes</option>
	                </c:if>
	        	    <c:if test="${aprop.filter!=0}">
	                  <option value="0">No</option>
	                  <option value="1" selected>Yes</option>
	                </c:if>	                
	            </select>
	          </label>
	        </span>
	    </div>		
	    <br>
	</form:form>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">		
	<thead>
		<tr>
		<th class="center" style="width: 50px;">
		<label> 
		 <input	type="checkbox" class="ace" /> <span class="lbl"></span>
		</label>
		</th>
        <th>告警名称</th>
        <th>机盘</th>
        <th>严重程度</th>
        <th>告警类型</th>

        <th>是否屏蔽</th>
        <th>描述</th>
		<th>操作</th>
		</tr>
	</thead>
	<tbody>
	  <c:forEach items="${pages.list}" var="prop">
		<tr>
		<td class="center">
			<label>
				<input value="${prop.id}" type="checkbox" class="ace" /> 
				<span class="lbl"></span>
			</label>
		 </td>
         <td>${prop.aname}</td>
         <td>${prop.cardtype.cardtype}</td>
         <td>${prop.severity.severity}</td>
         <td>${prop.alarmtype.alarmdesc}</td>
         <td align="center">
           ${prop.filter==0 ? '否':'是'}
         </td>
         <td>${prop.description}</td>
		 <td>
<%-- 			<a href="javascript:onDelete('${prop.id}')">删除</a> --%>
			<a href="javascript:onUpdate('${prop.id}')">编辑</a>
		 </td>
		 </tr>
	   </c:forEach>
	</tbody>
	</table>	
	${pages}
 	<div id="modalTable" action="new" class="fade" tabindex="-1" style="display:none;">
		<div class="modal-dialog">
			<div class="modal-content" >
				<div class="modal-header no-padding">
					<div class="table-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							<span class="white">&times;</span>
						</button>
						<span id='modalTitle'>告警属性</span>
					</div>
				</div>
				<br>
				<form id="frmSubmit" class="form-horizontal" action="${ctx}/alarm/alarmprop/update" role="form" method="post">
					<input type="hidden" name="sort" value="30"/>
					<input type="hidden" name="m_id"/>
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">告警名称</label>
							<div class="col-sm-9">
								<input name="m_aname" type="text" class="col-xs-10"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">告警类型</label>
							<div class="col-sm-9">
	                            <select class="col-xs-10" name="m_alarmtype">
	                             <c:forEach items="${atlist}" var="atype">
 	                              <option value="${atype.aid}">${atype.alarmdesc}</option>
 	                             </c:forEach>
	                            </select>								
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">机盘</label>
							<div class="col-sm-9">
	        	                <select class="col-xs-10" name="m_cardtype">
	                              <option value="0" selected>ALL</option>
	                              <c:forEach items="${ctypelist}" var="ctype">
<%--  	                                <option value="${slot.card.cardid}">${slot.num}：${slot.card.cardtype.cardtype}</option> --%>
 	                                <option value="${ctype.id}" selected>${ctype.cardtype}</option>
 	                              </c:forEach>
	                            </select>	
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">严重程度</label>
							<div class="col-sm-9">
							 <select class="col-xs-10" name="m_severity">
								<c:forEach items="${selist}" var="se">
								  <option value="${se.id}">${se.severity}</option>
								</c:forEach>
							 </select>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">是否屏蔽</label>
							<div class="col-sm-9">
	        	                <select class="col-xs-10" name="m_filter">
	                              <option value="0" selected>No</option>
	                              <option value="1">Yes</option>
	                            </select>								
							</div>
						</div>	
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">描述</label>
							<div class="col-sm-9">
	                            <input name="m_description" type="text" class="col-xs-10"/>						
							</div>
						</div>								
					<div class="space-4"></div>
					<div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							<button id="btnSubmit" class="btn btn-info" type="button">
								<i class="icon-ok bigger-110"></i> 保存
							</button>
							&nbsp; &nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="icon-undo bigger-110"></i> 重置
							</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div> 
</body>
</html>
